Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't log onRecoverableError if the current commit fail #28665

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

sebmarkbage
Copy link
Collaborator

We didn't recover after all.

Currently we might log a recoverable error in the recovery pass. E.g. the SSR server had an error. Then the client component fails to render which errors again. This ends up double logging.

So if we fail to actually complete a fully successful commit, we ignore any recoverable errors because we'll get real errors logged.

It's possible that this might cover up some other error that happened at the same time.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Mar 28, 2024
@react-sizebot
Copy link

react-sizebot commented Mar 28, 2024

Comparing: 323b6e9...493035b

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 176.93 kB 176.95 kB = 54.99 kB 55.00 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 173.11 kB 173.12 kB = 53.95 kB 53.95 kB
facebook-www/ReactDOM-prod.classic.js +0.01% 592.73 kB 592.81 kB +0.01% 103.97 kB 103.98 kB
facebook-www/ReactDOM-prod.modern.js +0.01% 574.31 kB 574.39 kB +0.01% 100.99 kB 101.00 kB
test_utils/ReactAllWarnings.js Deleted 65.10 kB 0.00 kB Deleted 16.27 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 65.10 kB 0.00 kB Deleted 16.27 kB 0.00 kB

Generated by 🚫 dangerJS against 493035b

@sebmarkbage sebmarkbage force-pushed the recoverableerrors branch 2 times, most recently from b6bde0a to db7f18d Compare March 28, 2024 03:42
const reportedClientErrors = [];
ReactDOMClient.hydrateRoot(container, <App />, {
onCaughtError(error) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm kind of confused why the lack of this override didn't fail the test before because it should've logged to console.error which fails the test.

@sebmarkbage sebmarkbage merged commit e10a7b5 into facebook:main Mar 28, 2024
38 checks passed
github-actions bot pushed a commit that referenced this pull request Mar 28, 2024
We didn't recover after all.

Currently we might log a recoverable error in the recovery pass. E.g.
the SSR server had an error. Then the client component fails to render
which errors again. This ends up double logging.

So if we fail to actually complete a fully successful commit, we ignore
any recoverable errors because we'll get real errors logged.

It's possible that this might cover up some other error that happened at
the same time.

DiffTrain build for [e10a7b5](e10a7b5)
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
We didn't recover after all.

Currently we might log a recoverable error in the recovery pass. E.g.
the SSR server had an error. Then the client component fails to render
which errors again. This ends up double logging.

So if we fail to actually complete a fully successful commit, we ignore
any recoverable errors because we'll get real errors logged.

It's possible that this might cover up some other error that happened at
the same time.
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
We didn't recover after all.

Currently we might log a recoverable error in the recovery pass. E.g.
the SSR server had an error. Then the client component fails to render
which errors again. This ends up double logging.

So if we fail to actually complete a fully successful commit, we ignore
any recoverable errors because we'll get real errors logged.

It's possible that this might cover up some other error that happened at
the same time.

DiffTrain build for commit e10a7b5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants